package com.itheima.demo3;

public interface Eatable {
    String eat();
}
class Test{
    public static void main(String[] args) {
        //useEatable(() -> {return "辣子夹馍";});
        Eatable i = new Eatable() {
            @Override
            public String eat() {
                System.out.println("123");
                return "123";

            }
        };
        i.eat();
        A a = new A();

    }
    public static void useEatable(Eatable eatable){
        String eat = eatable.eat();
        System.out.println("我今天中午吃了"+eat);
    }
}
class A implements Eatable {

    @Override
    public String eat() {
        return "123";
    }
}
